Skip to content

Conversation

@wvpm
Copy link
Contributor

@wvpm wvpm commented Jan 11, 2026

The ThreadPool created empty vectors:
memory::FixedVector<fixed_point_t> reusable_country_map_0 { country_keys.size() };
They have a fixed capacity but a size of 0. Subsequent indexing was out of bounds.

This PR fixes that by forcing you to either use FixedVector::create_empty(capacity) or specify a way to initialise the values.
The name create_empty is chosen to avoid accidental empty vector creation.

@wvpm wvpm added the bug Something isn't working label Jan 11, 2026
@wvpm wvpm force-pushed the fix_empty_reusable_maps branch 2 times, most recently from 2130060 to 6c2f72f Compare January 13, 2026 21:47
Spartan322
Spartan322 previously approved these changes Jan 14, 2026
@wvpm wvpm merged commit c971d7c into master Jan 14, 2026
16 checks passed
@wvpm wvpm deleted the fix_empty_reusable_maps branch January 14, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working topic:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants